<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="head.jsp" />
<link rel="stylesheet" type="text/css" href="${path}/css/monitor-user.min.css?" />
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
				<a href="main" title="Go to Home" class="tip-bottom"><i
					class="icon-home"></i> Home</a> <a href="userMain">Monitor Users</a> 
					<a href="#" class="current">
					   <c:if test="${not empty userId}">
					         Users Edit
					   </c:if>
					   <c:if test="${userId == null}">
					         Users Insert
					   </c:if>
					</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-info-sign"></i></span>
						<h5>
						  <c:if test="${not empty appId}">
					         Users Edit 
					      </c:if>
					      <c:if test="${appId == null}">
					         Users Insert
					      </c:if>
					    </h5>
					</div>
					<div class="widget-content nopadding">
						<form class="form-horizontal" method="post" action="doUserAction" name="basic_validate" id="basic_validate" novalidate="novalidate">
								<input type="hidden" name="userId" value="${userId}" />
								<div class="control-group">
									<label class="control-label">用户邮箱</label>
									<div class="controls">
										<input type="text" placeholder="请输入用户的邮箱....." data-title="只支持公司格式(*@grandsoft.com.cn)的邮箱." data-placement="right" class="span11 tip" data-original-title="" name="email" id="userEmail" value="${user.userEmail}">
									</div>
								</div>
            
                                <div class="control-group">
									<label class="control-label">手机号码</label>
									<div class="controls">
										<input type="text" placeholder="请输入用户的手机号码....." data-title="它将用于接收短信告警通知." data-placement="right" class="span11 tip" data-original-title=""  name="phoneNum" id="phoneNum" value="${user.phoneNum}">
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">用户密码</label>
									<div class="controls">
										<input type="text" placeholder="请输入用户密码....." data-title="初始密码为(123qwe!@#)." data-placement="right" class="span11 tip" data-original-title="" name="password" id="password" value="${user.password}">
									</div>
								</div>
								
								<div class="control-group">
								  <label class="control-label">用户类型</label>
								  <div class="controls">
								      <select name="userType" id="userType">
										<option value="0" <c:if test="${user.userType == 0}">selected="selected"</c:if>>一般用户</option>
										<option value="1" <c:if test="${user.userType == 1}">selected="selected"</c:if>>超级用户</option>
									  </select>
								  </div>
							    </div>
							    
							    <div class="control-group">
								  <label class="control-label">是否紧急联系人</label>
								  <div class="controls">
								      <select name="isEmergencyUser" id="isEmergencyUser">
								        <option value="1" <c:if test="${user.isEmergencyUser == 1}">selected="selected"</c:if>>否</option>
										<option value="0" <c:if test="${user.isEmergencyUser == 0}">selected="selected"</c:if>>是</option>
									  </select>
								  </div>
							    </div>
							    
								<div class="control-group">
									<label class="control-label">每日邮箱报警配额</label>
									<div class="controls">
										<input type="text" placeholder="请输入每日邮箱报警配额....." data-title="这里可以设置您每天接收邮件告警通知的数量上限，一旦到达这个数量，监控服务当天将不再向您的Email发送告警通知。" data-placement="right" class="span11 tip" data-original-title="" name="number" id="emailLimitNum" value="${user.emailLimitNum}">
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">每日手机报警配额</label>
									<div class="controls">
										<input type="text" placeholder="请输入每日手机报警配额....." data-title="这里可以设置手机每天接收短信的数量上限，一旦到达这个数量，监控服务将不再发送告警短信." data-placement="right" class="span11 tip" data-original-title="" name="phoneLimitNum" id="phoneLimitNum" value="${user.phoneLimitNum}">
									</div>
								</div>
								
					            <div class="form-actions">
					            <c:if test="${not empty userId}">
					               <button type="submit" class="btn btn-info">Edit</button>
					            </c:if>
					            <c:if test="${userId == null}">
					                <button type="submit" class="btn btn-success">Save</button>
	                            </c:if>
	                            <input type="button" name="Button"  value="Cancle" class="btn btn-danger" onClick="javascript:history.back()">
					            </div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="footer.jsp" />
<script src="${path}/js/monitor-user.min.js"></script>
</body>
</html>